--
-- PostgreSQL database dump
--

-- Dumped from database version 9.0.2
-- Dumped by pg_dump version 9.0.2
-- Started on 2011-01-15 21:16:35

SET statement_timeout = 0;
SET client_encoding = 'UTF8';
SET standard_conforming_strings = off;
SET check_function_bodies = false;
SET client_min_messages = warning;
SET escape_string_warning = off;

--
-- TOC entry 308 (class 2612 OID 11574)
-- Name: plpgsql; Type: PROCEDURAL LANGUAGE; Schema: -; Owner: -
--

CREATE OR REPLACE PROCEDURAL LANGUAGE plpgsql;


SET search_path = public, pg_catalog;

SET default_tablespace = '';

SET default_with_oids = false;

--
-- TOC entry 1501 (class 1259 OID 20364)
-- Dependencies: 1780 5
-- Name: cliente; Type: TABLE; Schema: public; Owner: -; Tablespace: 
--

CREATE TABLE cliente (
    cln_cdg integer NOT NULL,
    cln_tipodoc character varying(10) NOT NULL,
    cln_nro_doc integer NOT NULL,
    cln_apellido character varying(50) NOT NULL,
    cln_nombre character varying(50) NOT NULL,
    cln_nro_cliente character varying(50) NOT NULL,
    CONSTRAINT tipodoc_check CHECK ((((((cln_tipodoc)::text = 'DNI'::text) OR ((cln_tipodoc)::text = 'LIB. CIV.'::text)) OR ((cln_tipodoc)::text = 'LIB. ENR.'::text)) OR ((cln_tipodoc)::text = 'PASAP.'::text)))
);


--
-- TOC entry 1500 (class 1259 OID 20362)
-- Dependencies: 1501 5
-- Name: cliente_cln_cdg_seq; Type: SEQUENCE; Schema: public; Owner: -
--

CREATE SEQUENCE cliente_cln_cdg_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


--
-- TOC entry 1790 (class 0 OID 0)
-- Dependencies: 1500
-- Name: cliente_cln_cdg_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
--

ALTER SEQUENCE cliente_cln_cdg_seq OWNED BY cliente.cln_cdg;


--
-- TOC entry 1779 (class 2604 OID 20367)
-- Dependencies: 1500 1501 1501
-- Name: cln_cdg; Type: DEFAULT; Schema: public; Owner: -
--

ALTER TABLE cliente ALTER COLUMN cln_cdg SET DEFAULT nextval('cliente_cln_cdg_seq'::regclass);


--
-- TOC entry 1782 (class 2606 OID 20369)
-- Dependencies: 1501 1501
-- Name: cliente_pk; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: 
--

ALTER TABLE ONLY cliente
    ADD CONSTRAINT cliente_pk PRIMARY KEY (cln_cdg);


--
-- TOC entry 1784 (class 2606 OID 20372)
-- Dependencies: 1501 1501
-- Name: nro_cliente_unique; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: 
--

ALTER TABLE ONLY cliente
    ADD CONSTRAINT nro_cliente_unique UNIQUE (cln_nro_cliente);


--
-- TOC entry 1789 (class 0 OID 0)
-- Dependencies: 5
-- Name: public; Type: ACL; Schema: -; Owner: -
--

REVOKE ALL ON SCHEMA public FROM PUBLIC;
REVOKE ALL ON SCHEMA public FROM postgres;
GRANT ALL ON SCHEMA public TO postgres;
GRANT ALL ON SCHEMA public TO PUBLIC;


-- Completed on 2011-01-15 21:16:35

--
-- PostgreSQL database dump complete
--

